/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uy.edu.ort.ws.adminFuente;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.CodeSource;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Gonza
 */
public class LeerArchivo {
    @SuppressWarnings("empty-statement")
    
    public Properties getArchivoProperties (){
       try {
             //TODO code application logic here
            Properties props = new Properties();
            props.load(new FileInputStream("propiedades.properties"));
            
            if (!props.isEmpty()) 
            {                
                return props;
            } else {//sino  retornara NULL
                return null;
            }
            
            
            
        } catch (IOException ex) {
            System.out.println("Error: "+ex);
            return null;
        } 
    }
    
    public String getProperty(Properties properties, String clave)
    {
        return properties.getProperty(clave);
    }
}
